home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11239 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.misc,comp.lang.c,comp.lang.pl1,comp.lang.apl
  4. Subject: Re: GOTO controversy
  5. Date: 22 Mar 1996 11:13:18 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4iuu4eINNle@keats.ugrad.cs.ubc.ca>
  8. References: <314FB5F5.259B@simi.is> <3151B47F.70FD@connix.com> <4isrhqINNpol@keats.ugrad.cs.ubc.ca> <NICKB.96Mar22141650@abel.harlqn.co.uk>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <NICKB.96Mar22141650@abel.harlqn.co.uk>,
  12. Nick Barnes <nickb@harlequin.co.uk> wrote:
  13.  >In article <4isrhqINNpol@keats.ugrad.cs.ubc.ca> c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) writes:
  14.  >
  15.  >   recursion! ouch! I'd hate to do a no_loop(1,1000000000);
  16.  >
  17.  >Only because you are not familiar with compilers which perform
  18.  >tail-recursion elimination.
  19.  
  20. Actually I am, but I overlooked that.
  21.  
  22. By the way, some of those compilers will not eliminate the recursion if you
  23. don't turn on the optimization flag. The programmer is making the correct
  24. execution of the code depend on his expectation that the tail recursion will be
  25. eliminated by the compiler, instead of eliminating it himself. A large loop
  26. will blow the stack without the presence optimization, or use an inordinate
  27. amount of memory.
  28. -- 
  29.  
  30.